-
Notifications
You must be signed in to change notification settings - Fork 737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Marking Laser - Use laserTarget
#10351
base: markinglaser
Are you sure you want to change the base?
Conversation
e109836
to
f6bee09
Compare
I've tested this a bit in SP, when lasing from a loitering UAV (Yabhon) at 1000m AGL, the beam will lag behind a POINT tracked target (relative to the direction of flight) by about 3-4m across the ground. From the POV of the UAV it looks fine. Could some flashing pattern be implemented? Afaik irl TGP laser pointers flash in a pattern to be more noticeable, especially from the air or when only the spot on the ground is really going to be visible. |
because it's scripted, it's pretty easy to add any patterns we want IZLID lasers mentioned a 3-5Hz pulse, so I went with that |
Works pretty well, except for the spot being comically large at low TGP zoom levels in any illuminator mode. I'm also not sure about the requirement of the LD having to be on to fire the illuminator. |
https://www.youtube.com/watch?v=v1vLwu_oWLQ this is the problem with original markingLaser pr |
private _smoothing = _aircraft getVariable [QGVAR(smoothing), []]; | ||
_smoothing pushBack _laserDir; | ||
if (count _smoothing > 5) then { _smoothing deleteAt 0 }; | ||
private _smoothDir = [0,0,0]; | ||
{ _smoothDir = _smoothDir vectorAdd _x } forEach _smoothing; | ||
_smoothDir = _smoothDir vectorMultiply (1/count _smoothing); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know absolutely nothing about drawLaser
, so please forgive my ignorance, but what was wrong with the old method of drawing it to max distance and adding onto it from there?
Co-authored-by: Jouni Järvinen <[email protected]>
["CBA_settingsInitialized", { | ||
TRACE_1("settingsInitialized",1); | ||
|
||
GVAR(pfEH) = -1; | ||
["visionMode", LINKFUNC(onLaserOn), true] call CBA_fnc_addPlayerEventHandler; | ||
["ace_laserOn", { | ||
params ["", "_args"]; | ||
_args params ["_object"]; | ||
if !(_object getVariable [QGVAR(enabled), false]) exitWith {}; | ||
_object setVariable [QGVAR(smoothing), []]; | ||
_object setVariable [QGVAR(flashOffset), random 1]; // make flashes not synchronized | ||
|
||
[] call LINKFUNC(onLaserOn); | ||
}] call CBA_fnc_addEventHandler; | ||
}] call CBA_fnc_addEventHandler; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why this needs to be executed after the CBA settings have been initialised?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure what we wanted to do for settings on this
just threw it inside so it would be easy to add
Rework #7761
Uses ace_laser system to handle getting origin and direction
eliminates the stair-step flicker of trying to manually sync turret direction
does require the laser to be on as well